package com.dbqn.zhao.entiy;

import java.util.List;

public class User {
    //快递用户的属性类

     private String sender;//寄件人信息
     private String recipients;//收件人信息
     private String timer;//取件时间
     private String item;//物品类型
     private String data;//寄件日期
     private int weight;//物品重量
     private int gujia;//物品估价
     private int baojia;//物品保价
     private int zongjia;//物品总价
     private String danh;//快递单号
     private String jijianfs;//寄件方式
     private int count=0;//修改次数

     public int getCount() {
          return count;
     }

     public void setCount(int count) {
          this.count = count;
     }

     public String getTimer() {
          return timer;
     }

     public void setTimer(String timer) {
          this.timer = timer;
     }

     public String getJijianfs() {
          return jijianfs;
     }

     public void setJijianfs(String jijianfs) {
          this.jijianfs = jijianfs;

     }

     public String getSender() {
          return sender;
     }

     public void setSender(String sender) {
          this.sender = sender;
     }

     public String getRecipients() {
          return recipients;
     }

     public void setRecipients(String recipients) {
          this.recipients = recipients;
     }

     public String getItem() {
          return item;
     }

     public void setItem(String item) {
          this.item = item;
     }

     public String getData() {
          return data;
     }

     public void setData(String data) {
          this.data = data;
     }

     public int getWeight() {
          return weight;
     }

     public void setWeight(int weight) {
          this.weight = weight;
     }

     public int getGujia() {
          return gujia;
     }

     public void setGujia(int gujia) {
          this.gujia = gujia;
     }

     public int getBaojia() {
          return baojia;
     }

     public void setBaojia(int baojia) {
          this.baojia = baojia;
     }

     public int getZongjia() {
          return zongjia;
     }

     public void setZongjia(int zongjia) {
          this.zongjia = zongjia;
     }

     public String getDanh() {
          return danh;
     }

     public void setDanh(String danh) {
          this.danh = danh;
     }

     public void print(User user){
          System.out.println("快递单号:"+user.danh);
          System.out.println("取件方式:"+user.jijianfs);

          if(user.jijianfs.equals("服务店自取")){
               System.out.println("最近的寄件点:菜鸟驿站");
          }

          System.out.println("取件时间:"+user.timer);
          System.out.println("寄件人信息:"+user.sender);
          System.out.println("收件人信息:"+user.recipients);
          System.out.println("物品类型:"+user.item);
          System.out.println("物品重量（kg）:"+user.weight);
          System.out.println("估价（元）:"+user.gujia+"\t保价费(元):"+user.baojia);
          System.out.println("总价（元）:"+user.zongjia);
          System.out.println("寄件日期"+user.data);
     }


     public void print(List list){

          for (int i = 0; i <list.size() ; i++) {
               User user=(User) list.get(i);
               System.out.println("快递单号:"+user.danh);
               System.out.println("收件人信息:"+user.recipients);
               System.out.println("取件方式:"+user.jijianfs);
               System.out.println("寄件日期"+user.data);
               System.out.println("*********");
               System.out.println();
          }
     }

}
